﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Kimola.Config
{
  internal class KimolaConfigurationDocumentElement : ConfigurationElement
  {
    private static ConfigurationProperty defaultPartSpace;
    private static ConfigurationProperty defaultCulture;
    private static ConfigurationPropertyCollection properties;

    static KimolaConfigurationDocumentElement()
    {
      KimolaConfigurationDocumentElement.defaultPartSpace = new ConfigurationProperty("defaultPartSpace", typeof(string), null, ConfigurationPropertyOptions.IsRequired);
      KimolaConfigurationDocumentElement.defaultCulture = new ConfigurationProperty("defaultCulture", typeof(string), null, ConfigurationPropertyOptions.IsRequired);

      KimolaConfigurationDocumentElement.properties = new ConfigurationPropertyCollection();
      KimolaConfigurationDocumentElement.properties.Add(KimolaConfigurationDocumentElement.defaultPartSpace);
      KimolaConfigurationDocumentElement.properties.Add(KimolaConfigurationDocumentElement.defaultCulture);
    }

    [ConfigurationProperty("defaultPartSpace", IsRequired = true)]
    internal string DefaultPartSpace { get { return Convert.ToString(base[defaultPartSpace]); } }

    [ConfigurationProperty("defaultCulture", IsRequired = true)]
    internal string DefaultCulture { get { return Convert.ToString(base[defaultCulture]); } }
  }
}